package t3invoke;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

import t3bean.MoneyRecordBean;
import t3dao.MoneyRecordDao;

public class ShowMoneyRecordAction implements Action {
	@Override
	public void showMoneyRecord() {
		MoneyRecordDao mrd = new MoneyRecordDao();
		List<MoneyRecordBean> list = new ArrayList<>();

		try {
			list = mrd.select(null);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		for (MoneyRecordBean mrb : list) {
			System.out.println("停车位    ："+mrb.getSpaceId());
			System.out.println("车牌号    ："+mrb.getCarId());
			System.out.println("缴费        ："+mrb.getMoney());
			System.out.println("停车时间："+mrb.getParkingtime());
			System.out.println("取车时间："+mrb.getGettime());
			System.out.println();
		}

	}

	@Override
	public void parkCar(Scanner sc) {
	}

	@Override
	public void showParkingSpace() {
	}

	@Override
	public void getCar(Scanner sc) {
	}

}
